<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use App\Repository\AdminModuleRepository;

/**
 * @ORM\Entity(repositoryClass=AdminModuleRepository::class)
 */
class AdminModule
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\Column(type="integer", nullable=true, options={"default"="0","comment"="上级模块ID 0为顶级模块"})
     */
    private $pid = 0;

    /**
     * @ORM\Column(type="string", length=255, nullable=true, options={"comment"="模块名称"})
     */
    private $name;

    /**
     * @ORM\Column(type="string", length=255, nullable=true, options={"comment"="权限标识"})
     */
    private $auth_sign;

    /**
     * @ORM\Column(type="integer", nullable=true, options={"default"="1", "comment"="类型：1菜单 2功能"})
     */
    private $type = 1;

    /**
     * @ORM\Column(type="integer", nullable=true, options={"default"="0", "comment"="排序"})
     */
    private $sort = 0;

    /**
     * @ORM\Column(type="boolean", nullable=true, options={"default"="1", "comment"="状态 0停用 1启用"})
     */
    private $status = true;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getPid(): ?int
    {
        return $this->pid;
    }

    public function setPid(?int $pid): self
    {
        $this->pid = $pid;

        return $this;
    }

    public function getName(): ?string
    {
        return $this->name;
    }

    public function setName(?string $name): self
    {
        $this->name = $name;

        return $this;
    }

    public function getSort(): ?int
    {
        return $this->sort;
    }

    public function setSort(?int $sort): self
    {
        $this->sort = $sort;

        return $this;
    }

    public function getStatus(): ?bool
    {
        return $this->status;
    }

    public function setStatus(?bool $status): self
    {
        $this->status = $status;

        return $this;
    }

    public function getType(): ?int
    {
        return $this->type;
    }

    public function setType(?int $type): self
    {
        $this->type = $type;

        return $this;
    }

    public function getAuthSign(): ?string
    {
        return $this->auth_sign;
    }

    public function setAuthSign(?string $auth_sign): self
    {
        $this->auth_sign = $auth_sign;

        return $this;
    }
}
